import 'package:extended_text_field/extended_text_field.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

// 聊天=底部=文字
class ChatBottomInput extends StatelessWidget {
  final TextEditingController textController;
  final ScrollController scrollController;
  final FocusNode focusNode;
  const ChatBottomInput({
    super.key,
    required this.textController,
    required this.focusNode,
    required this.scrollController,
  });

  @override
  Widget build(BuildContext context) {
    return ExtendedTextField(
      controller: textController,
      scrollController: scrollController,
      focusNode: focusNode,
      minLines: 1,
      maxLines: 5,
      maxLength: 5000,
      maxLengthEnforcement: MaxLengthEnforcement.none,
      decoration: const InputDecoration(
        fillColor: Colors.white,
        contentPadding: EdgeInsets.all(10),
        counterText: '',
      ),
    );
  }
}
